package com.summer.bean;

import com.alibaba.fastjson.JSONObject;

public class Response {
	private int status;				//1成功获取状态表示，失败为0
    private String info;			//中文描述
    private JSONObject data;			//返回对象
    
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public String getInfo() {
		return info;
	}
	public void setInfo(String info) {
		this.info = info;
	}
	public JSONObject getData() {
		return data;
	}
	public void setData(JSONObject data) {
		this.data = data;
	}
	
	public <T> T dataToT(Class<T> clazz){
		return data.toJavaObject(clazz);
	}
	
	public String toLog(){
		return "status:"+status+",info:"+info+",data:"+data.toJSONString();
	}
}
